/*
 * Copyright 2010 Christoph Widulle (christoph.widulle@googlemail.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */



package com.android1.amarena2d.texture;

import com.badlogic.gdx.graphics.Texture;

public class TextureOptions {

    public static final TextureOptions NEAREST = new TextureOptions(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest, Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
    public static final TextureOptions BILINEAR = new TextureOptions(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear, Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
    public static final TextureOptions REPEATING = new TextureOptions(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest, Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);
    public static final TextureOptions REPEATING_BILINEAR = new TextureOptions(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear, Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);


    public final Texture.TextureFilter magFilter;
    public final Texture.TextureFilter minFilter;
    public final Texture.TextureWrap uWrap;
    public final Texture.TextureWrap vWrap;


    public static TextureOptions $(Texture.TextureFilter magFilter, Texture.TextureFilter minFilter, Texture.TextureWrap uWrap, Texture.TextureWrap vWrap) {
        return new TextureOptions(magFilter, minFilter, uWrap, vWrap);
    }

    public TextureOptions(TextureOptions textureOptions) {
        this(textureOptions.magFilter, textureOptions.minFilter, textureOptions.uWrap, textureOptions.vWrap);
    }


    public TextureOptions(Texture.TextureFilter magFilter, Texture.TextureFilter minFilter, Texture.TextureWrap uWrap, Texture.TextureWrap vWrap) {
        this.magFilter = magFilter;
        this.minFilter = minFilter;
        this.uWrap = uWrap;
        this.vWrap = vWrap;
    }

//    public void set(Texture.TextureFilter magFilter, Texture.TextureFilter minFilter, Texture.TextureWrap uWrap, Texture.TextureWrap vWrap) {
//        this.magFilter = magFilter;
//        this.minFilter = minFilter;
//        this.uWrap = uWrap;
//        this.vWrap = vWrap;
//    }
//
//    public void set(TextureOptions textureOptions){
//        this.magFilter = textureOptions.magFilter;
//        this.minFilter = textureOptions.minFilter;
//        this.uWrap = textureOptions.uWrap;
//        this.vWrap = textureOptions.vWrap;
//    }

    public Texture.TextureFilter getMagFilter() {
        return magFilter;
    }

    public Texture.TextureFilter getMinFilter() {
        return minFilter;
    }

    public Texture.TextureWrap getUWrap() {
        return uWrap;
    }

    public Texture.TextureWrap getVWrap() {
        return vWrap;
    }
}
